package com.liu.sx.service;

import com.liu.sx.dao.MenuDao;
import com.liu.sx.entity.Menu;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

@Service
@Slf4j
@Transactional
public class MenuService {

    @Autowired
  private MenuDao menuDao;



    public List<Menu> findAll(){

      return   menuDao.findAll();
    }


    public void addMenu(Menu menu) {

        menuDao.save(menu);

    }
}
